/**
 * 2017，thor.com，all rights reserved。
 * 
 * Project：		palmmall-api
 * Filename：	DailySalesReportParam.java
 * Created：		2017年4月27日
 * Creator：		wolv
 */
package com.thor.palmmall.api.rpt.sales;

import com.thor.commons.exception.ThorServiceException;
import com.thor.palmmall.api.rpt.Month;
import com.thor.palmmall.api.rpt.ReportParam;

/**
 * @author wolv
 *
 */
public class DailySalesReportParam extends ReportParam {
  private static final long serialVersionUID = 4573370717287355425L;

  public static final String DIMENSIONFIELD_BIZTYPE = "bizType";
  public static final String DIMENSIONFIELD_FLOOR = "floor";
  public static final String DIMENSIONFIELD_SHOP = "shop";
  public static final String DIMENSIONFIELD_SALESDATE = "date";
  public static final String VALUEFIELD_AMOUNT = "amount";
  public static final String VALUEFIELD_QUANTITY = "quantity";
  public static final String DIMENSIONFIELD_STORE = "store";

  public void validate() throws ThorServiceException {
    super.validate();
  }

  // where
  private String cooperationType;
  private Boolean isMainShop;
  private Month month;

  public String getCooperationType() {
    return cooperationType;
  }

  public void setCooperationType(String cooperationType) {
    this.cooperationType = cooperationType;
  }

  public Boolean getIsMainShop() {
    return isMainShop;
  }

  public void setIsMainShop(Boolean isMainShop) {
    this.isMainShop = isMainShop;
  }

  public Month getMonth() {
    return month;
  }

  public void setMonth(Month month) {
    this.month = month;
  }

  static {
    availableDimensionField.add(DIMENSIONFIELD_BIZTYPE);
    availableDimensionField.add(DIMENSIONFIELD_FLOOR);
    availableDimensionField.add(DIMENSIONFIELD_SHOP);
    availableDimensionField.add(DIMENSIONFIELD_STORE);
    availableDimensionField.add(DIMENSIONFIELD_SALESDATE);
    availableAggregationValueField.add(VALUEFIELD_AMOUNT);
    availableAggregationValueField.add(VALUEFIELD_QUANTITY);
  }

  public static DailySalesReportParam sample() {
    DailySalesReportParam param = new DailySalesReportParam();

    param.setDimensionField(DIMENSIONFIELD_BIZTYPE);
    param.setAggregationValueField(VALUEFIELD_AMOUNT);

    return param;
  }
}
